﻿using ConsoleApp1.Services;
using Microsoft.Extensions.DependencyInjection;
using System.ComponentModel.Design;

namespace ConsoleApp1
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("程序启动！");

            var builder = new ServiceCollection()
                .AddSingleton<NlogService>()
                .AddSingleton<MainService>()
                .AddSingleton<FreeSqlService>()
                .AddSingleton<DataUploadOutPartailService>()
                .AddSingleton<DataUploadRService>()
                .AddSingleton<DataUploadTempService>()
                .AddSingleton<ConfigService>()
                .AddTransient<PrintService>()
                .BuildServiceProvider();

            var main = builder.GetService<MainService>();
            main.Start();

            Console.ReadLine();


        }
    }
}
